package thinkingJava.chapter16;

import java.util.Arrays;

public class FillingArrays {
	public static void main(String[] args) {
		int size = 6;
		boolean[] a1 = new boolean[size];
		byte[] a2 = new byte[size];
		char[] a3 = new char[size];
		short[] a4 = new short[size];
		int[] a5 = new int[size];
		long[] a6 = new long[size];
		float[] a7 = new float[size];
		double[] a8 = new double[size];
		String[] a9 = new String[size];
		Arrays.fill(a1, true);
		print("a1 = " + Arrays.toString(a1));
		Arrays.fill(a2, (byte)11);
		print("a2 = " + Arrays.toString(a2));
		Arrays.fill(a3, 'x');
		print("a3 = " + Arrays.toString(a3));
		Arrays.fill(a4, (short)18);
		print("a4 = " + Arrays.toString(a4));
		Arrays.fill(a5, 108);
		print("a5 = " + Arrays.toString(a5));
		Arrays.fill(a6, 10086l);
		print("a6 = " + Arrays.toString(a6));
		Arrays.fill(a7, 1.1f);
		print("a7 = " + Arrays.toString(a7));
		Arrays.fill(a8, 3.6);
		print("a8 = " + Arrays.toString(a8));
		Arrays.fill(a9, "abcdefg");
		print("a9 = " + Arrays.toString(a9));
	}
	public static void print(Object obj) {
		System.out.println(obj);
	}
}
